package com.demo.skill.funny.cpu;

public class CpuUse {

    public static void main(String[] args) {
        drawLine();
    }

    public static void drawLine() {
        int usage = 7000;
        System.out.println("test begin ...");
        while (true) {
            long start = System.currentTimeMillis();
            while (System.currentTimeMillis() - start < usage) {
                try {
                    Thread.sleep(10000 - usage);
                } catch (Exception e) {
                    System.out.println(e);
                }
            }
        }
    }


}
